﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StartMVC.Models;

namespace StartMVC.Controllers
{
    public class BaseController : Controller
    {
        //
        // GET: /Base/
        protected Models.StartMVCDBContext db = new Models.StartMVCDBContext();

        protected List<Cart> Carts
        {
            get
            {
                if (Session["Cart"] == null)
                {
                    Session["Cart"] = new List<Cart>();
                }
                return (Session["Cart"]) as List<Cart>;
            }
            set
            {
                Session["Cart"] = value;
            }
        }

        
    }
}
